package com.tarena.lbs.basic.web.rpc;

import com.tarena.lbs.basic.api.StoreApi;
import com.tarena.lbs.basic.web.service.IStoreService;
import com.tarena.lbs.pojo.basic.vo.StoreVO;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class StoreApiImpl implements StoreApi {

    @Resource
    private IStoreService storeService;

    @Override
    public boolean verificationByStoreIDS(List<Integer> ids) {
        StoreVO store = null;
        for (int id : ids) {
            store = storeService.getStoreById(id);
            if (store==null)
                return false;
        }
        return true;
    }

    @Override
    public StoreVO getStoreById(Integer id) {
        return storeService.getStoreById(id);
    }
}
